<div class="ui-g-12 p-20">
  <p-panel headerClass="bg-none" [showScroll]="false" [style]="{'margin-bottom':'20px'}">
    <p-header>
      <div class="text-right">
        <span class="border-l-1a8fe8 p-l-8 pull-left m-t-8">工队信息</span>
        <button pButton type="button" (click)=" checkStatus()" label="审核" class="btn btn-secondary"></button>
        <button pButton type="button" (click)="back()" label="取消" class="btn btn-secondary m-l-8"></button>
      </div>
    </p-header>

    <div class="table-row">
      <div class="table-cell text-right p-l-25">
        所属公司：
      </div>
      <div class="table-cell" style="min-width:350px;">
        {{teamInfo.companyName}}
      </div>
    </div>

    <div class="table-row">
      <div class="table-cell text-right p-l-25">
        工队名称：
      </div>
      <div class="table-cell" style="min-width:350px;">
        {{teamInfo.name}}
      </div>
    </div>
    <div class="table-row">
      <div class="table-cell text-right p-l-25">
        劳务公司：
      </div>
      <div class="table-cell" style="min-width:350px;">
        {{teamInfo.labourCompany}}
      </div>
    </div>

    <div class="table-row">
      <div class="table-cell text-right p-l-25">
        服务区域：
      </div>
      <div class="table-cell" style="min-width:350px;">
        {{teamInfo.serviceAreaName}}
      </div>
    </div>

    <div class="table-row">
      <div class="table-cell text-right p-l-25">
        联系电话：
      </div>
      <div class="table-cell" style="min-width:350px;">
        {{teamInfo.telephone}}
      </div>
    </div>

    <div class="table-row">
      <div class="table-cell text-right p-l-25">
        工人数量：
      </div>
      <div class="table-cell" style="min-width:350px;">
        {{teamInfo.workerNum}}人
      </div>
    </div>

    <div class="table-row">
      <div class="table-cell text-right p-l-25">
        施工能力：
      </div>
      <div class="table-cell" style="min-width:350px;">
        {{teamInfo.ability}}套
      </div>
    </div>

    <div class="table-row">
      <div class="table-cell text-right p-l-25">
        是否推荐：
      </div>
      <div class="table-cell" style="min-width:350px;">
        {{teamInfo.isRecommend?'是':'否'}}
      </div>
    </div>
    <div class="table-row">
      <div class="table-cell text-right p-l-25">
        保证金状态：
      </div>
      <div class="table-cell" style="min-width:350px;">
        {{teamInfo.cashDepositStatusText}}
      </div>
    </div>
    <div class="table-row">
      <div class="table-cell text-right p-l-25">
        保证金额：
      </div>
      <div class="table-cell" style="min-width:350px;">
        {{teamInfo.cashAmount}}元
      </div>
    </div>
  </p-panel>

  <p-panel headerClass="bg-none" [showScroll]="false" [style]="{'margin-bottom':'20px'}">
    <p-header>
      <div class="text-right p-6-0">
        <span class="border-l-1a8fe8 p-l-8 pull-left m-t-8" >项目经理信息</span>
        <div style="height:36px;"></div>

      </div>
    </p-header>

    <div class="ui-lg-12 ui-md-12 head-title">
      基本信息
    </div>

    <div class="table-row">
      <div class="table-cell text-right p-l-25">
        账号：
      </div>
      <div class="table-cell mi-w-800">
        {{foreman.account}}
      </div>
    </div>

    <div class="table-row">
      <div class="table-cell text-right p-l-25">
        从业时间：
      </div>
      <div class="table-cell mi-w-800">
        {{foreman.workingStartTime | date: "yyyy-MM-dd" }}
      </div>
    </div>

    <div class="table-row">
      <div class="table-cell text-right p-l-25">
        身份证号：
      </div>
      <div class="table-cell mi-w-800">
        {{foreman.idNumber}}
      </div>
    </div>

    <div class="table-row">
      <div class="table-cell text-right p-l-25">
        从业年限：
      </div>
      <div class="table-cell mi-w-800">
        {{foreman.workingYears
        <=0 ? '不满一年':foreman.workingYears}} </div>
      </div>

      <div class="table-row">
        <div class="table-cell text-right p-l-25">
          手机号：
        </div>
        <div class="table-cell mi-w-800">
          {{foreman.managerTelephone}}
        </div>
      </div>

      <div class="table-row">
        <div class="table-cell text-right p-l-25">
          性别：
        </div>
        <div class="table-cell mi-w-800">
          {{foreman.sex===0?'男':'女'}}
        </div>
      </div>

      <div class="table-row">
        <div class="table-cell text-right p-l-25">
          籍贯：
        </div>
        <div class="table-cell mi-w-800">
          {{foreman.birthPlace}}
        </div>
      </div>

      <div class="table-row">
        <div class="table-cell text-right p-l-25 v-a-m">
          级别：
        </div>
        <div class="table-cell mi-w-800">
          <div class="i-b-180">
            {{foreman.level}}分
          </div>
        </div>
      </div>

      <div class="table-row">
        <div class="table-cell text-right p-l-25">
          现居地：
        </div>
        <div class="table-cell mi-w-800">
          {{foreman.addressCurrent}}
        </div>
      </div>

      <div class="table-row">
        <div class="table-cell text-right p-l-25">
          户籍所在地：
        </div>
        <div class="table-cell mi-w-800">
          {{foreman.addressBirth}}
        </div>
      </div>

      <div class="table-row">
        <div class="table-cell text-right p-l-25">
          个人简介：
        </div>
        <div class="table-cell mi-w-800">
          {{foreman.description}}
        </div>
      </div>

      <div class="table-row">
        <div class="table-cell text-right p-l-25 v-a-t">
          手持身份证照片：
        </div>
        <div class="table-cell mi-w-800">
          <div class="pull-left load-img" *ngIf="managerPhotoPcImages&&managerPhotoPcImages.length">
            <p-lightboxfile [showDelete]="false" styleClass="inline-block" [images]="managerPhotoPcImages"></p-lightboxfile>
          </div>
        </div>
      </div>

      <div class="table-row">
        <div class="table-cell text-right p-l-25 v-a-t">
          身份证正面：
        </div>
        <div class="table-cell mi-w-800">
          <div class="pull-left load-img" *ngIf="idcardPhotoFrontImages&&idcardPhotoFrontImages.length">
            <p-lightboxfile [showDelete]="false" styleClass="inline-block" [images]="idcardPhotoFrontImages"></p-lightboxfile>
          </div>
        </div>
      </div>

      <div class="table-row">
        <div class="table-cell text-right p-l-25 v-a-t">
          身份证反面：
        </div>
        <div class="table-cell mi-w-800">
          <div class="pull-left load-img" *ngIf="idcardPhotoReverseImages&&idcardPhotoReverseImages.length">
            <p-lightboxfile [showDelete]="false" styleClass="inline-block" [images]="idcardPhotoReverseImages"></p-lightboxfile>
          </div>
        </div>
      </div>
      <div class="table-row">
        <div class="table-cell text-right p-l-25  v-a-t">
          保险单附件：
        </div>
        <div class="table-cell  mi-w-800" >
          <div class="pull-left load-img" *ngIf="insuranceAttachImages&&insuranceAttachImages.length">
            <p-lightboxfile [showDelete]="false" styleClass="inline-block" [images]="insuranceAttachImages"></p-lightboxfile>
          </div>
        </div>
      </div>

      <div class="table-row">
        <div class="table-cell text-right p-l-25 ">
          保险起止日期：
        </div>
        <div class="table-cell">
          {{foreman.insuranceStartTime | date: "yyyy-MM-dd"}} ~ {{foreman.insuranceEndTime | date: "yyyy-MM-dd"}}
        </div>
      </div>

      <div class="table-row">
        <div class="table-cell text-right p-l-25  v-a-t">
          合同附件：
        </div>
        <div class="table-cell">
          <div class="pull-left load-img" *ngIf="serviceContractAttachImages&&serviceContractAttachImages.length">
            <p-lightboxfile [showDelete]="false" styleClass="inline-block" [images]="serviceContractAttachImages"></p-lightboxfile>
          </div>
        </div>
      </div>

      <div class="table-row m-b-20">
        <div class="table-cell text-right p-l-25 ">
          合同起止日期：
        </div>
        <div class="table-cell">
          {{foreman.contractStartTime | date: "yyyy-MM-dd"}} - {{foreman.contractEndTime| date: "yyyy-MM-dd"}}
        </div>
      </div>

      <div class="ui-lg-12 ui-md-12 head-title">
        职业资格证件
      </div>

      <div class="table-row">
        <div class="table-cell text-right p-l-25  v-a-t">
          电工证附件：
        </div>
        <div class="table-cell mi-w-800">
          <div class="pull-left load-img" *ngIf="electricAttachImages&&electricAttachImages.length">
            <p-lightboxfile [showDelete]="false" styleClass="inline-block" [images]="electricAttachImages"></p-lightboxfile>
          </div>
        </div>
      </div>

      <div class="table-row">
        <div class="table-cell text-right p-l-25 ">
          电工证起止日期：
        </div>
        <div class="table-cell">
          {{foreman.electricAttachStartTime | date: "yyyy-MM-dd"}} - {{foreman.electricAttachEndTime | date: "yyyy-MM-dd"}}
        </div>
      </div>

      <div class="table-row">
        <div class="table-cell text-right p-l-25  v-a-t">
          管道证附件：
        </div>
        <div class="table-cell">
          <div class="pull-left load-img" *ngIf="pipeCardAttachImages&&pipeCardAttachImages.length">
            <p-lightboxfile [showDelete]="false" styleClass="inline-block" [images]="pipeCardAttachImages"></p-lightboxfile>
          </div>
        </div>
      </div>

      <div class="table-row m-b-20">
        <div class="table-cell text-right p-l-25 ">
          管道证起止日期：
        </div>
        <div class="table-cell">
          {{foreman.pipeCardStartTime | date: "yyyy-MM-dd"}} - {{foreman.pipeCardEndTime | date: "yyyy-MM-dd"}}
        </div>
      </div>


      <div class="ui-lg-12 ui-md-12 head-title">
        企业培训(签字后拍照上传)
      </div>

      <div class="table-row">
        <div class="table-cell text-right p-l-25  v-a-t">
          施工手册：
        </div>
        <div class="table-cell mi-w-800">
          <div class="pull-left load-img" *ngIf="constructionManualImages&&constructionManualImages.length">
            <p-lightboxfile [showDelete]="false" styleClass="inline-block" [images]="constructionManualImages"></p-lightboxfile>
          </div>
        </div>
      </div>
      <div class="table-row">
        <div class="table-cell text-right p-l-25  v-a-t">
          产品套餐手册：
        </div>
        <div class="table-cell">
          <div class="pull-left load-img" *ngIf="productManualImages&&productManualImages.length">
            <p-lightboxfile [showDelete]="false" styleClass="inline-block" [images]="productManualImages"></p-lightboxfile>
          </div>
        </div>
      </div>

      <div class="table-row">
        <div class="table-cell text-right p-l-25  v-a-t">

          工程部处罚规范：
        </div>
        <div class="table-cell">
          <div class="pull-left load-img" *ngIf="engineerStandardImages&&engineerStandardImages.length">
            <p-lightboxfile [showDelete]="false" styleClass="inline-block" [images]="engineerStandardImages"></p-lightboxfile>
          </div>
        </div>
      </div>

      <div class="table-row">
        <div class="table-cell text-right p-l-25  v-a-t">
          APP使用规范：
        </div>
        <div class="table-cell">
          <div class="pull-left load-img" *ngIf="appStandardImages&&appStandardImages.length">
            <p-lightboxfile [showDelete]="false" styleClass="inline-block" [images]="appStandardImages"></p-lightboxfile>
          </div>
        </div>
      </div>

  </p-panel>

  <p-panel headerClass="bg-none" [showScroll]="false" [style]="{'margin-bottom':'20px'}">
    <p-header>
      <div class="text-right p-6-0">
        <span class="border-l-1a8fe8 p-l-8 pull-left m-t-8">工人信息</span>
        <div style="height:36px;"></div>
      </div>
    </p-header>
    <p-dataTable [value]="workerData" [totalRecords]="workerTotalRecords" [rows]="5" [rowsPerPageOptions]="[5,10,20]" [loading]="workerLoading"
      [lazy]="true" [paginator]="true" [pageLinks]="4" (onPage)='onPage($event)' [emptyMessage]="'没有搜到您想要的数据'">
      <p-column *ngFor="let col of colsWorker" [field]='col.field' [header]='col.header'>
        <ng-template let-index="rowIndex" let-data="rowData" pTemplate="body" *ngIf="col.tem">
          <div *ngIf="col.field === 'address'">
            {{data.addressCurrent}}
          </div>
          <div *ngIf="col.field === 'code'">
              <a target="_blank" [routerLink]="['/saas/engineer/constructionteam/worker', data.id]" style="color:#1a91eb;cursor:pointer;">{{data.code}}</a>
          </div>
        </ng-template>
      </p-column>
    </p-dataTable>
  </p-panel>

  <p-panel headerClass="bg-none" [showScroll]="false">
    <p-header>
      <div class="text-right p-6-0">
        <span class="border-l-1a8fe8 p-l-8 pull-left m-t-8">审核日志</span>
        <div style="height:36px;"></div>
      </div>
    </p-header>
    <p-dataTable [value]="checkData" scrollable="true" [emptyMessage]="'没有搜到您想要的数据'">
      <p-column *ngFor="let col of colsCheck" [field]='col.field' [header]='col.header'>
        <ng-template let-index="rowIndex" let-data="rowData" pTemplate="body" *ngIf="col.tem">
          <div *ngIf="col.field === 'approveTime'">
            {{data.approveTime? (data.approveTime | date:"yyyy-MM-dd HH:mm:ss") : ''}}
          </div>
        </ng-template>
      </p-column>
    </p-dataTable>
  </p-panel>

  </div>


  <p-dialog header="审核" [(visible)]="displayCheck"  modal="modal" width="700" [responsive]="true">
    <div class="">
      <div class="inline-block p-l-38">
        <form #form="ngForm" (ngSubmit)="form.form.valid" novalidate class="form-horizontal" role="form">
          <div class="table-row">
            <div class="table-cell text-right1 p-l-25 p-required">是否通过：</div>
            <div class="table-cell " style="text-align: left;">
              <div class="i-b" style="margin-right:5px;line-height:48px;" *ngFor="let item of approveStatus">
                <p-radioButton name="group1" (onClick)="approveResultCK()"  [value]="item.code" [label]="item.name" [(ngModel)]="checkObj.approveResult" inputId="opt1"></p-radioButton>
              </div>
              <p-message  *ngIf="approveResultError" styleClass="p-center relative r-t" severity="error" [text]="approveResultError"></p-message>
            </div>
          </div>

          <div class="table-row">
            <div class="table-cell text-right1 p-l-25 p-required v-a-t">原因/备注：</div>
            <div class="table-cell">
              <textarea [rows]="3" #textarea (blur)="approveNoteCK()" (focus)="approveNoteError = ''" maxlength="100" name="approveNote" [cols]="40"
               pInputTextarea autoResize="true" [ngClass]="approveNoteError ? 'p-input-error':''" [(ngModel)]="checkObj.approveNote" style="resize: none;" placeholder="请输入原因/备注"></textarea>
               <div class="text-right opacity06" style="width:100%;">还可输入{{100 - (checkObj.approveNote?.length || 0)}}个字</div>
            </div>
            <div class="table-cell relative" >
                <p-message styleClass="p-center v-a-m m-t-10"  *ngIf="approveNoteError" severity="error" [text]="approveNoteError"></p-message>
            </div>
          </div>

          <div class="table-row">
              <div class="table-cell text-right1 p-l-25"></div>
              <div class="table-cell">
                  <button pButton type="button" (click)="check()" label="确定" class="p-btn"></button>
                  <button pButton type="button" (click)="displayCheck=false;clearSubmitError()" label="取消" class="btn btn-secondary m-l-8"></button>
              </div>
          </div>

        </form>
      </div>
    </div>

  </p-dialog>





  <!-- 查看员工信息弹窗 start  -->
  <p-dialog header="查看工人信息" [(visible)]="displayWorkInfo" modal="modal" width="800" [responsive]="true">
    <div class="ui-g">

      <div class="ui-g-12 ui-md-12 ui-lg-6 ui-g-nopad">
        <div class="ui-g ">
          <div class="ui-g-12 ui-md-12 ui-lg-3 width-120 text-right">
            用户名：
          </div>
          <div class="ui-g-12 ui-md-12 ui-lg-7 ">
            {{workerInfo.code}}
          </div>
        </div>
      </div>

      <div class="ui-g-12 ui-md-12 ui-lg-6 ui-g-nopad">
        <div class="ui-g ">
          <div class="ui-g-12 ui-md-12 ui-lg-2  width-120  text-right">
            所属施工队：
          </div>
          <div class="ui-g-12 ui-md-12 ui-lg-7 ">
            {{workerInfo.organization}}
          </div>
        </div>
      </div>
      <div class="ui-g-12 ui-md-12 ui-lg-6 ui-g-nopad">
        <div class="ui-g ">
          <div class="ui-g-12 ui-md-12 ui-lg-2  width-120  text-right">
            身份证号：
          </div>
          <div class="ui-g-12 ui-md-12 ui-lg-7 ">
            {{workerInfo.idNumber}}
          </div>
        </div>
      </div>

      <div class="ui-g-12 ui-md-12 ui-lg-6 ui-g-nopad">
        <div class="ui-g ">
          <div class="ui-g-12 ui-md-12 ui-lg-2  width-120  text-right">
            从业时间：
          </div>
          <div class="ui-g-12 ui-md-12 ui-lg-7 ">
            {{workerInfo.workingStartTime}}
          </div>
        </div>
      </div>

      <div class="ui-g-12 ui-md-12 ui-lg-6 ui-g-nopad">
        <div class="ui-g ">
          <div class="ui-g-12 ui-md-12 ui-lg-2  width-120  text-right">
            手机号：
          </div>
          <div class="ui-g-12 ui-md-12 ui-lg-7 ">
            {{workerInfo.telephone}}
          </div>
        </div>
      </div>

      <div class="ui-g-12 ui-md-12 ui-lg-6 ui-g-nopad">
        <div class="ui-g ">
          <div class="ui-g-12 ui-md-12 ui-lg-2  width-120  text-right">
            从业年限：
          </div>
          <div class="ui-g-12 ui-md-12 ui-lg-7 ">
            {{workerInfo.workingYears}}
          </div>
        </div>
      </div>

      <div class="ui-g-12 ui-md-12 ui-lg-6 ui-g-nopad">
        <div class="ui-g ">
          <div class="ui-g-12 ui-md-12 ui-lg-2  width-120  text-right">
            性别：
          </div>
          <div class="ui-g-12 ui-md-12 ui-lg-7 ">
            {{workerInfo.sex===0?'男':'女'}}
          </div>
        </div>
      </div>

      <div class="ui-g-12 ui-md-12 ui-lg-6 ui-g-nopad">
        <div class="ui-g ">
          <div class="ui-g-12 ui-md-12 ui-lg-2  width-120  text-right">
            籍贯：
          </div>
          <div class="ui-g-12 ui-md-12 ui-lg-7 ">
            {{workerInfo.birthPlace}}
          </div>
        </div>
      </div>

      <div class="ui-g-12 ui-md-12 ui-lg-6 ui-g-nopad">
        <div class="ui-g ">
          <div class="ui-g-12 ui-md-12 ui-lg-2  width-120  text-right">
            现居地：
          </div>
          <div class="ui-g-12 ui-md-12 ui-lg-7 ">
            {{workerInfo.addressCurrentProvince+workerInfo.addressCurrentCity+workerInfo.addressCurrentArea+workerInfo.addressCurrentDetail}}
          </div>
        </div>
      </div>

      <div class="ui-g-12 ui-md-12 ui-lg-6 ui-g-nopad">
        <div class="ui-g ">
          <div class="ui-g-12 ui-md-12 ui-lg-2  width-120  text-right">
            户籍所在地：
          </div>
          <div class="ui-g-12 ui-md-12 ui-lg-7 ">
            {{workerInfo.addressBirthProvince+workerInfo.addressBirthCity+workerInfo.addressBirthArea+workerInfo.addressBirthDetail}}
          </div>
        </div>
      </div>

      <div class="ui-g-12 ui-md-12 ui-lg-12 ui-g-nopad">
        <div class="ui-g-12 ui-md-12 ui-lg-2  width-120  text-right">
          级别：
        </div>
        <div class="ui-g-12 ui-md-12 ui-lg-7 ">
          {{workerInfo.level}}
        </div>
      </div>

      <div class="ui-g-12 ui-md-12 ui-lg-12 ui-g-nopad">
        <div class="ui-g-12 ui-md-12 ui-lg-2  width-120  text-right">
          个人简介：
        </div>
        <div class="ui-g-12 ui-md-12 ui-lg-7 ">
          {{workerInfo.description}}
        </div>
      </div>

      <div class="ui-g-12 ui-md-12 ui-lg-12 ui-g-nopad">
        <div class="ui-g-12 ui-md-12 ui-lg-2  width-120  text-right">
          工种：
        </div>
        <div class="ui-g-12 ui-md-12 ui-lg-7 ">
          {{workerInfo.workType}}
        </div>
      </div>

      <div class="ui-g-12 ui-md-12 ui-lg-4">
        <div class="ui-g">
          <div class="ui-g-12 ui-md-12 ui-lg-3 width-120   text-left">
            照片：
          </div>
          <div class="ui-g-12 ui-md-12 ui-lg-7  width-120  text-left">
            {{workerInfo.workPhoto}}
          </div>
        </div>
      </div>
      <div class="ui-g-12 ui-md-12 ui-lg-4">
        <div class="ui-g">
          <div class="ui-g-12 ui-md-12 ui-lg-3  width-120  text-left">
            身份证正面：
          </div>
          <div class="ui-g-12 ui-md-12 ui-lg-7  text-left">
            {{workerInfo.idcardPhotoFront}}
          </div>
        </div>
      </div>

      <div class="ui-g-12 ui-md-12 ui-lg-4">
        <div class="ui-g">
          <div class="ui-g-12 ui-md-12 ui-lg-3 width-120  text-left">
            身份证反面:
          </div>
          <div class="ui-g-12 ui-md-12 ui-lg-9  text-left">
            {{workerInfo.idcardPhotoReverse}}
          </div>
        </div>
      </div>

      <div class="ui-g-12 ui-md-12 ui-lg-6 ui-g-nopad">
        <div class="ui-g ">
          <div class="ui-g-12 ui-md-12 ui-lg-2  width-120  text-right">
            电工证附件：
          </div>
          <div class="ui-g-12 ui-md-12 ui-lg-7 ">
            {{workerInfo.electricAttach}}
          </div>
        </div>
      </div>

      <div class="ui-g-12 ui-md-12 ui-lg-6 ui-g-nopad">
        <div class="ui-g ">
          <div class="ui-g-12 ui-md-12 ui-lg-2  width-120  text-right">
            管道证附件：
          </div>
          <div class="ui-g-12 ui-md-12 ui-lg-7 ">
            {{workerInfo.pipeCardAttach}}
          </div>
        </div>
      </div>


      <div class="ui-g-12 ui-md-12 ui-lg-6 ui-g-nopad">
        <div class="ui-g ">
          <div class="ui-g-12 ui-md-12 ui-lg-2  width-120  text-right" style="padding: 8px 0;">
            电工证起止日期：
          </div>
          <div class="ui-g-12 ui-md-12 ui-lg-7 ">
            {{workerInfo.electricAttachStartTime | date: "yyyy-MM-dd"}} 至 {{workerInfo.electricAttachEndTime| date: "yyyy-MM-dd"}}
          </div>
        </div>
      </div>

      <div class="ui-g-12 ui-md-12 ui-lg-6 ui-g-nopad">
        <div class="ui-g ui-g-nopad">
          <div class="ui-g-12 ui-md-12 ui-lg-2  width-120  text-right " style="padding: 8px 0;">
            管道证起止日期:
          </div>
          <div class="ui-g-12 ui-md-12 ui-lg-7 ">
            {{workerInfo.pipeCardStartTime | date: "yyyy-MM-dd"}} 至 {{workerInfo.pipeCardEndTime| date: "yyyy-MM-dd"}}
          </div>
        </div>
      </div>
      <button pButton type="button" (click)="displayWorkInfo=false" label="取消" class="ui-button-secondary p-btn"></button>
    </div>

  </p-dialog>
  <!-- 查看员工信息弹窗 end  -->
